/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.hazard.promise.entity;

import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.bizz.hazard.common.constant.enums.HazardSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 企业安全承诺公告
 *
 * @author pig
 * @date 2024-01-17 16:57:40
 */
@Data
@TableName("haz_promise_notice")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "企业安全承诺公告")
public class HazPromiseNoticeEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;


	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	* 研判级别
	*/
    @Schema(description="研判级别")
    private String assessmentLevel;

	/**
	* 风险级别
	*/
    @Schema(description="风险级别")
    private Integer riskLevel;

	/**
	* 研判车间
	*/
    @Schema(description="研判车间")
    private Long deptId;

	/**
	* 研判班组
	*/
    @Schema(description="研判班组")
    private Long groupId;

	/**
	* 承诺人
	*/
    @Schema(description="承诺人")
    private String promisePersion;

	/**
	* 承诺日期
	*/
    @Schema(description="承诺日期")
	@DateTimeFormat("yyyy-MM-dd")
    private Date promiseDate;

	/**
	* 生产装置套数
	*/
    @Schema(description="生产装置套数")
    private Integer produceNum;

	/**
	* 运行套数
	*/
    @Schema(description="运行套数")
    private Integer runNum;

	/**
	* 停车套数
	*/
    @Schema(description="停车套数")
    private Integer stopNum;

	/**
	* 检维修作业数
	*/
    @Schema(description="检维修作业数")
    private Integer maintainNum;

	/**
	* 断路作业数
	*/
    @Schema(description="断路作业数")
    private Integer brokenRoadNum;

	/**
	* 动土作业数
	*/
    @Schema(description="动土作业数")
    private Integer diggingNum;

	/**
	* 高处作业数
	*/
    @Schema(description="高处作业数")
    private Integer heightOperationNum;

	/**
	* 临时用电数
	*/
    @Schema(description="临时用电数")
    private Integer tempElectricityNum;

	/**
	* 吊装作业数
	*/
    @Schema(description="吊装作业数")
    private Integer liftNum;

	/**
	* 盲板作业数
	*/
    @Schema(description="盲板作业数")
    private Integer blindNum;

	/**
	* 倒灌作业数
	*/
    @Schema(description="倒灌作业数")
    private Integer takingOutTankNum;

	/**
	* 清罐作业数
	*/
    @Schema(description="清罐作业数")
    private Integer cleanTankNum;

	/**
	* 切水作业数
	*/
    @Schema(description="切水作业数")
    private Integer cutWaterNum;

	/**
	* 一级动火作业数
	*/
    @Schema(description="一级动火作业数")
    private Integer oneLevelFireNun;

	/**
	* 二级动火作业数
	*/
    @Schema(description="二级动火作业数")
    private Integer twoLevelFireNum;

	/**
	* 特殊动火作业数
	*/
    @Schema(description="特殊动火作业数")
    private Integer specialFireNum;

	/**
	* 受限空间作业数
	*/
    @Schema(description="受限空间作业数")
    private Integer limitedSpaceNum;

	/**
	* 是否处于试生产情况
	*/
    @Schema(description="是否处于试生产情况")
    private String trialProduceFlag;

	/**
	* 是否处于开停车状态情况
	*/
    @Schema(description="是否处于开停车状态情况")
    private String parkingFlag;

	/**
	* 是否有承包商作业
	*/
    @Schema(description="是否有承包商作业")
    private String contractorJobFlag;

	/**
	* 有无重大隐患
	*/
    @Schema(description="有无重大隐患")
    private String riskFlag;

	/**
	* 是否开展中（扩）试
	*/
    @Schema(description="是否开展中（扩）试")
    private String testFlag;

	/**
	* 承诺
	*/
    @Schema(description="承诺")
    private String promiseContent;

	/**
	* 研判内容
	*/
    @Schema(description="研判内容")
    private String assessmentContent;

	/**
	* 研判方法
	*/
    @Schema(description="研判方法")
    private Long assessmentMethod;

	/**
	* 研判材料
	*/
    @Schema(description="研判材料")
    private String assessmentMaterial;

	/**
	* 研判人
	*/
    @Schema(description="研判人")
    private String assessmentPerson;

	/**
	* 研判状态
	*/
    @Schema(description="研判状态")
    private Integer status;

	/**
	* 审批状态
	*/
    @Schema(description="审批状态")
    private Integer auditStatus;

	/**
	* 研判类别
	*/
    @Schema(description="研判类别")
    private Integer type;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;


    public String getOrgIdStr() {
    	return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company, this.getOrgId());
	}

	public String getStatusStr() {
		return DictResolver.getItemLabelByValue(HazardSysDictEnum.hazard_promise_notice_status, this.getStatus());
	}

	public String getRiskLevelStr() {
    	return  DictResolver.getItemLabelByValue(HazardSysDictEnum.hazard_promise_notice_risk_level, this.getRiskLevel());
	}


}
